import itertools
c=0
for i in itertools.permutations('1234',3):
    print(i)
    c+=1
print("共有{}个".format(c))